import { Action } from "@/mdesign-lib/mdesign-app.umd.js";
import { archService } from "@/mdesign-lib/mdesign-app.umd.js";
import { Shape, GraphModel } from "@/mdesign-lib/mdesign-graph.umd.js";
import { ActionKey } from "@/mdesign-lib/mdesign-app.umd.js";

export class DeleteProjectStatusAction extends Action {
  keyName = "deleteProjectStatus" as ActionKey;
  desc = "deleteProjectStatus";

  async run(projectId: string, modelId: string) {
    archService.deleteProjectStatus(projectId, modelId);
  }

  onShapeMenuClick(graph: GraphModel, shape: Shape) {
    const modelId = shape.modelId;
    const projectId = app.activeProject!.id;
    this.run(projectId, modelId);
  }
}
